package com.learn.game_card;

import com.learn.game_card.entity.role;
import com.learn.game_card.service.round;
/**
 * 卡牌类对战游戏
 * 创建两个角色并进行战斗，选择攻击方式和攻击属性
 * 直到其中一个角色的健康值为零
 */
public class Main {
    public static void main(String[] args) {
        role role1 = new role("challenger", 3, 5);
        role role2 = new role("boss", 10, 5);
        // 循环进行战斗
        while (role1.getHealth()>0 && role2.getHealth()>0){
            round round = new round();
            round.roundGo(role1, role2);
        }
        if(role1.getHealth()==0){
            System.out.println("你输了！");
        }
        if(role2.getHealth()==0){
            System.out.println("你赢了！");
        }
    }
}
